package com.ruijiang.controller.order_service;


import com.ruijiang.controller.ApiPrefix;
import com.ruijiang.dto.page.PageOrderDto;
import com.ruijiang.result.PageResult;

import com.ruijiang.service.OrderService.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(ApiPrefix.ORDER_SERVICE+"/order")
@Slf4j
public class OrderController {


    @Autowired
    OrderService orderService;

    /**
     * 分页查询
     * @return
     */
    @GetMapping("/search")
    public PageResult getOrderList(PageOrderDto dto){
        log.info("分页查询订单{}",dto);
        return orderService.getOrderList(dto);
    }


}
